package cn.green.data;

import cn.green.components.model.SysUser;

import java.util.HashMap;
import java.util.Map;

/**
 * 用户数据仓库
 */
public class UserDataRepository {

    private static Map<String, SysUser> repository = new HashMap<String, SysUser>();

    public static SysUser getSysUser(String username) {
        return repository.get(username);
    }

    public static void addSysUser(SysUser user) {
        if (user != null)
            repository.put(user.getUsername(), user);
    }

}
